package com.zzx.work1;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("girl")
public class GetGirlController {

	@RequestMapping("ggirll")
	public @ResponseBody Object getUser(@RequestParam("aaa") Girl girl) {
		
		throw new NullPointerException("数据库不见了");
		
	}
	
	@RequestMapping("print")
	public void aaa(HttpServletResponse resp) {   
		resp.setContentType("text/html;charset=utf-8");
		try {
			resp.getWriter().println("<h1>这里是打印输出流</h1>");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
}
